﻿Imports Microsoft.TeamFoundation.Client

Public Class FormSelectServer

    Private Sub FormSelectServer_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim serverNames As String() = RegisteredServers.GetServerNames
        Dim server As String
        For Each server In serverNames
            Me.ux_ServerComboBox.Items.Add(server)
        Next
        If (serverNames.Length > 0) Then
            Me.ux_ServerComboBox.Text = serverNames(0)
        End If
    End Sub

    Private Sub ux_SetButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ux_SetButton.Click
        My.MySettings.Default.TFServer = Me.ux_ServerComboBox.Text
        My.MySettings.Default.Save()
        MyBase.DialogResult = DialogResult.OK
        MyBase.Close()
    End Sub

End Class